package com.xsky.logic.casedesc;

import java.util.List;

import com.xsky.common.util.UUIDUtil;
import com.xsky.database.dao.impl.BaseEntityDaoImpl;
import com.xsky.operation.vo.TabCaseDescResolve;

public class CaseDescLogic
{

	BaseEntityDaoImpl dao = new BaseEntityDaoImpl();
	/**
	 * 查询case有多少个”事件描述和解决方案“
	 * @param caseId
	 * @return
	 */
	public List<TabCaseDescResolve> queryByCaseId(String caseId)
	{
		return dao.findByKey(new TabCaseDescResolve(), "caseId", caseId);
	}
	public void addOrUpdate(TabCaseDescResolve cdr)
	{
		if(cdr.getId() == null){
			cdr.setId(UUIDUtil.getUUID());
		}
		dao.saveOrUpdateEntity(cdr);
		
	}

}
